#ifndef RP2PARTICLES_H
#define RP2PARTICLES_H

#include "Rp2TriMesh.h"
#include "Rp2Vector3Array.h"
#include "Rp2FloatArray.h"

namespace Rp2
{
	
class Camera;

class Particles : public TriMesh
{
public:
	// construction and destruction.
	Particles();
	Particles(const Attributes& rkAttr, Vector3fArray* pkLocations,
		FloatArray* pkSizes);
	virtual ~Particles();

	// data members
	Vector3fArrayPtr Locations;
	FloatArrayPtr Sizes;
	float SizeAdjust;

	void SetActiveQuantity(int iActiveQuantity);
	int GetActiveQuantity() const;

	// the particles are billboards that always face the camera
	void GenerateParticles(const Camera* pkCamera);

protected:

    // culling	
	virtual void GetVisibleSet(Culler& rkCuller, bool bNoCull);

    // Allow application to specify fewer than the maximum number of vertices
    // to draw.
    int m_iActiveQuantity;

};

typedef Pointer<Particles> ParticlesPtr;
#include "Rp2Particles.inl"

}


#endif